package com.panshi.api;

import com.panshi.vo.qa.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "qa-server",contextId = "title-api")
public interface ITitleAip {
    /*ITitleAip(分类Api)*/

    /**
     * 添加分类
     * @param title
     * @return
     */
    @PostMapping("/title/add")
    @ResponseBody
    DataResultQA addTitle(@RequestBody Title title);

    /**
     * 查询分类
     * @param title
     * @return
     */
    @PostMapping("/title/queryTitle")
    @ResponseBody
    DataResultQA<List<Title>> queryTitle(@RequestBody Title title);

    /**
     * 查询分类
     * @param title
     * @return
     */
    @PostMapping("/title/queryByNameTitle")
    @ResponseBody
    DataResultQA<Title> queryByNameTitle(@RequestBody Title title);

    /**
     * 修改分类
     * @param title
     * @return
     */
    @PostMapping("/title/updateTitle")
    @ResponseBody
    DataResultQA updateTitle(@RequestBody Title title);

    /**
     * 禁用分类
     * @param tid
     * @return
     */
    @PostMapping("/title/forbidUseTitle/{tid}")
    @ResponseBody
    DataResultQA forbidUseTitle(@PathVariable int tid);

    /**
     * 启用分类
     * @param tid
     * @return
     */
    @PostMapping("/title/startUseTitle/{tid}")
    @ResponseBody
    DataResultQA startUseTitle(@PathVariable int tid);

}
